<?php
    namespace app\api\controller\v1;

    use app\api\model\Poetries as PoetriesModel;
    // use app\api\validate\AuthorDate;
    use app\api\validate\IDMustBePositiveInt;

    class Poetries
    {

        public function getTitle()
        {
            (new IDMustBePositiveInt())->goCheck();
            $id = input('id');
            $limit = input('limit',10);
            $requset = PoetriesModel::getTitle($id,$limit);
            return [
                'code'=> 0,
                'data'=> $requset
            ];
        }
        public function getDetail($id)
        {
            (new IDMustBePositiveInt())->goCheck();
            $id = input('id');
            $requset = PoetriesModel::getDetail($id);
            return [
                'code'=> 0,
                'data'=> $requset
            ];
        }
    }
    